[llvm] e8e8bfe - [DataFlowSanitizer] Simplify attribute removal (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 22 00:44:37 PST 2021


Author: Nikita Popov
Date: 2021-12-22T09:42:55+01:00
New Revision: e8e8bfeeb7233bde17d0a811b87d392271b33f42

URL: https://github.com/llvm/llvm-project/commit/e8e8bfeeb7233bde17d0a811b87d392271b33f42
DIFF: https://github.com/llvm/llvm-project/commit/e8e8bfeeb7233bde17d0a811b87d392271b33f42.diff

LOG: [DataFlowSanitizer] Simplify attribute removal (NFC)

We're only removing a single attribute, so there is no need to
go through AttrBuilder.

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index 9eedd9fd151e5..9f26b37bbc796 100644
--- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -1121,7 +1121,7 @@ DataFlowSanitizer::buildWrapperFunction(Function *F, StringRef NewFName,
 
   BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF);
   if (F->isVarArg()) {
-    NewF->removeFnAttrs(AttrBuilder().addAttribute("split-stack"));
+    NewF->removeFnAttr("split-stack");
     CallInst::Create(DFSanVarargWrapperFn,
                      IRBuilder<>(BB).CreateGlobalStringPtr(F->getName()), "",
                      BB);


        


More information about the llvm-commits mailing list