aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorJuneyoung Lee <aqjune@gmail.com>2021-11-06 15:39:19 +0900
committerJuneyoung Lee <aqjune@gmail.com>2021-11-06 15:39:19 +0900
commit89ad2822affb7c120c52eddfa22d593af6e1a08a (patch)
treea93dd7f89d6020cbd7ec3ad9cf5ccb09715ab9c5 /clang/lib/CodeGen/CGCall.cpp
parent7584ef766a7219b6ee5a400637206d26e0fa98ac (diff)
downloadllvm-89ad2822affb7c120c52eddfa22d593af6e1a08a.zip
llvm-89ad2822affb7c120c52eddfa22d593af6e1a08a.tar.gz
llvm-89ad2822affb7c120c52eddfa22d593af6e1a08a.tar.bz2
Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default"
This reverts commit 7584ef766a7219b6ee5a400637206d26e0fa98ac.
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index c3b8739..daea09b 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2255,7 +2255,7 @@ void CodeGenModule::ConstructAttributeList(
getLangOpts().Sanitize.has(SanitizerKind::Return);
// Determine if the return type could be partially undef
- if (!CodeGenOpts.DisableNoundefAttrs && HasStrictReturn) {
+ if (CodeGenOpts.EnableNoundefAttrs && HasStrictReturn) {
if (!RetTy->isVoidType() && RetAI.getKind() != ABIArgInfo::Indirect &&
DetermineNoUndef(RetTy, getTypes(), DL, RetAI))
RetAttrs.addAttribute(llvm::Attribute::NoUndef);
@@ -2390,7 +2390,7 @@ void CodeGenModule::ConstructAttributeList(
// Decide whether the argument we're handling could be partially undef
bool ArgNoUndef = DetermineNoUndef(ParamType, getTypes(), DL, AI);
- if (!CodeGenOpts.DisableNoundefAttrs && ArgNoUndef)
+ if (CodeGenOpts.EnableNoundefAttrs && ArgNoUndef)
Attrs.addAttribute(llvm::Attribute::NoUndef);
// 'restrict' -> 'noalias' is done in EmitFunctionProlog when we