summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 9faba754334..28f59742cee 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1967,7 +1967,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
continue;
llvm::Attribute fnAttrs = oldAttrs.getFnAttributes();
- if (fnAttrs.hasAttributes())
+ if (oldAttrs.hasAttributes(llvm::AttributeSet::FunctionIndex))
newAttrs.push_back(llvm::
AttributeWithIndex::get(llvm::AttributeSet::FunctionIndex,
fnAttrs));
OpenPOWER on IntegriCloud