aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-05-22 17:19:45 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-05-22 17:19:45 +0000
commitdef18494b97f554ea0d95db75627c3e77b74307f (patch)
tree2207c6057d204b9b591770eae96465d8d7bbe8bd /include/clang
parentbfbfee51ec8f20f3f1b9f8329705d816b67438e7 (diff)
wire -fbounds-checking to the new LLVM bounds checking pass
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/LangOptions.def1
-rw-r--r--include/clang/Frontend/CodeGenOptions.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def
index a795c57881..d2ce7c0df6 100644
--- a/include/clang/Basic/LangOptions.def
+++ b/include/clang/Basic/LangOptions.def
@@ -157,7 +157,6 @@ BENIGN_LANGOPT(ConstexprCallDepth, 32, 512,
"maximum constexpr call depth")
BENIGN_LANGOPT(NumLargeByValueCopy, 32, 0,
"if non-zero, warn about parameter or return Warn if parameter/return value is larger in bytes than this setting. 0 is no check.")
-BENIGN_LANGOPT(BoundsChecking , 8, 0, "if non-zero, add run-time bounds checking code")
VALUE_LANGOPT(MSCVersion, 32, 0,
"version of Microsoft Visual C/C++")
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h
index 3181c0affd..be7f03fe13 100644
--- a/include/clang/Frontend/CodeGenOptions.h
+++ b/include/clang/Frontend/CodeGenOptions.h
@@ -172,6 +172,9 @@ public:
/// or 0 if unspecified.
unsigned NumRegisterParameters;
+ /// The run-time penalty for bounds checking, or 0 to disable.
+ unsigned char BoundsChecking;
+
public:
CodeGenOptions() {
AsmVerbose = 0;
@@ -224,6 +227,7 @@ public:
VerifyModule = 1;
StackRealignment = 0;
StackAlignment = 0;
+ BoundsChecking = 0;
DebugInfo = NoDebugInfo;
Inlining = NoInlining;