forked from OSchip/llvm-project
parent
de089d462c
commit
2e217d6555
|
@ -630,6 +630,7 @@ llvm::Constant *CodeGenModule::EmitAnnotateAttr(llvm::GlobalValue *GV,
|
||||||
new llvm::GlobalVariable(*M, unit->getType(), false,
|
new llvm::GlobalVariable(*M, unit->getType(), false,
|
||||||
llvm::GlobalValue::PrivateLinkage, unit,
|
llvm::GlobalValue::PrivateLinkage, unit,
|
||||||
".str");
|
".str");
|
||||||
|
unitGV->setUnnamedAddr(true);
|
||||||
|
|
||||||
// Create the ConstantStruct for the global annotation.
|
// Create the ConstantStruct for the global annotation.
|
||||||
llvm::Constant *Fields[4] = {
|
llvm::Constant *Fields[4] = {
|
||||||
|
|
|
@ -5,4 +5,6 @@ void a(char *a) {
|
||||||
__attribute__((annotate("bar"))) static char bar;
|
__attribute__((annotate("bar"))) static char bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHECK: private unnamed_addr global
|
||||||
|
// CHECK: private unnamed_addr global
|
||||||
// CHECK: @llvm.global.annotations = appending global [2 x %0]
|
// CHECK: @llvm.global.annotations = appending global [2 x %0]
|
||||||
|
|
Loading…
Reference in New Issue