Created
January 2, 2019 11:55
LLVM LTO bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "common.h" | |
X<int> *make_X() | |
{ | |
return new X<int>; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "common.h" | |
template class X<int>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseClass { | |
public: | |
~BaseClass() { }; | |
}; | |
template<typename T> | |
class X : public BaseClass { | |
public: | |
virtual ~X() { }; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libbug.so: a.o b.o | |
clang++ -O1 -flto -shared -o $@ $^ | |
%.o: %.cpp common.h | |
clang++ -O1 -flto -o $@ -c $< | |
clean: | |
rm libbug.so a.o b.o | |
.PHONY: clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment