mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 14:50:42 +08:00
without defining them. This should be an error, but I'm paranoid about "uses" that end up not actually requiring a definition. I'll revisit later. Also, teach IR generation to not set internal linkage on variable declarations, just for safety's sake. Doing so produces an invalid module if the variable is not ultimately defined. Also, fix several places in the test suite where we were using internal functions without definitions. llvm-svn: 126016
20 lines
297 B
C++
20 lines
297 B
C++
// RUN: %clang_cc1 -emit-llvm -o - %s
|
|
|
|
// PR5775
|
|
class Twine {
|
|
Twine(const char *Str) { }
|
|
};
|
|
|
|
static void error(const Twine &Message) {}
|
|
|
|
template<typename>
|
|
struct opt_storage {
|
|
void f() {
|
|
error("cl::location(x) specified more than once!");
|
|
}
|
|
};
|
|
|
|
void f(opt_storage<int> o) {
|
|
o.f();
|
|
}
|