summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CodeGenModule.cpp9
-rw-r--r--lib/CodeGen/CodeGenModule.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d474c1b464..2f3f0f0269 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -725,14 +725,13 @@ void CodeGenModule::SetCommonAttributes(const Decl *D,
}
void CodeGenModule::setNonAliasAttributes(const Decl *D,
- llvm::GlobalValue *GV) {
- assert(!isa<llvm::GlobalAlias>(GV));
- SetCommonAttributes(D, GV);
+ llvm::GlobalObject *GO) {
+ SetCommonAttributes(D, GO);
if (const SectionAttr *SA = D->getAttr<SectionAttr>())
- GV->setSection(SA->getName());
+ GO->setSection(SA->getName());
- getTargetCodeGenInfo().SetTargetAttributes(D, GV, *this);
+ getTargetCodeGenInfo().SetTargetAttributes(D, GO, *this);
}
void CodeGenModule::SetInternalFunctionAttributes(const Decl *D,
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 92a92c64ed..cdab553ca6 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -1020,7 +1020,7 @@ private:
/// NOTE: This should only be called for definitions.
void SetCommonAttributes(const Decl *D, llvm::GlobalValue *GV);
- void setNonAliasAttributes(const Decl *D, llvm::GlobalValue *GV);
+ void setNonAliasAttributes(const Decl *D, llvm::GlobalObject *GO);
/// Set attributes for a global definition.
void setFunctionDefinitionAttributes(const FunctionDecl *D,