diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0bb9c91..dec0cba 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1744,6 +1744,13 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::OptimizeForSize); B.addAttribute(llvm::Attribute::Cold); } + if (D->hasAttr<HotAttr>()) { + if (!ShouldAddOptNone) + B.addAttribute(llvm::Attribute::OptimizeForSize); + // xur + // B.addAttribute(llvm::Attribute::Hot); + fprintf(stderr, "hihi 1\n"); + } if (D->hasAttr<MinSizeAttr>()) B.addAttribute(llvm::Attribute::MinSize); |