summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2021-01-12 11:22:31 -0800
committerZequan Wu <zequanwu@google.com>2021-01-12 12:10:46 -0800
commite53bbd99516fc7b612df1ae08d48288d0b8784ea (patch)
tree5e6fdd7e98164db1d4dacb428eb60d8fd18d2c91 /clang/lib/CodeGen/CodeGenModule.cpp
parent6cd44b204c6c6f2e915270af6792f247c4c23abc (diff)
[IR] move nomerge attribute from function declaration/definition to callsites
Move nomerge attribute from function declaration/definition to callsites to allow virtual function calls attach the attribute. Differential Revision: https://reviews.llvm.org/D94537
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index da5b03b138bf..bee51715bdc6 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1772,9 +1772,6 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
B.addAttribute(llvm::Attribute::MinSize);
}
- if (D->hasAttr<NoMergeAttr>())
- B.addAttribute(llvm::Attribute::NoMerge);
-
F->addAttributes(llvm::AttributeList::FunctionIndex, B);
unsigned alignment = D->getMaxAlignment() / Context.getCharWidth();