summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-30 19:33:44 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-30 19:33:44 +0000
commit035462c1cff42375079dd55fdb5a8a93cec6aacb (patch)
tree34918cb2ae5b7cc07871c957027fb2b15897891e /clang/lib/CodeGen/CGClass.cpp
parentcf8f7a10b7d60c8999fc6035ece84692ae5bc21f (diff)
downloadbcm5719-llvm-035462c1cff42375079dd55fdb5a8a93cec6aacb.tar.gz
bcm5719-llvm-035462c1cff42375079dd55fdb5a8a93cec6aacb.zip
Get rid of SanitizerOptions::Disabled global. NFC.
SanitizerOptions is not even a POD now, so having global variable of this type, is not nice. Instead, provide a regular constructor and clear() method, and let each CodeGenFunction has its own copy of SanitizerOptions it uses. llvm-svn: 220920
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 6f2c40af759..bef404d80a2 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -833,18 +833,16 @@ namespace {
class CopyingValueRepresentation {
public:
explicit CopyingValueRepresentation(CodeGenFunction &CGF)
- : CGF(CGF), SO(*CGF.SanOpts), OldSanOpts(CGF.SanOpts) {
- SO.Bool = false;
- SO.Enum = false;
- CGF.SanOpts = &SO;
+ : CGF(CGF), OldSanOpts(CGF.SanOpts) {
+ CGF.SanOpts.Bool = false;
+ CGF.SanOpts.Enum = false;
}
~CopyingValueRepresentation() {
CGF.SanOpts = OldSanOpts;
}
private:
CodeGenFunction &CGF;
- SanitizerOptions SO;
- const SanitizerOptions *OldSanOpts;
+ SanitizerOptions OldSanOpts;
};
}
OpenPOWER on IntegriCloud