diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-16 20:30:46 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-16 20:30:46 +0000 |
commit | 5f6eaac6115a44f4ef3d819123f8694d3d5825ea (patch) | |
tree | 4f2535126e469abb4e8af765dcd1692ec466424a /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
parent | 7cdedc1e029ea5860f9077abb39013ae7cc6e9cf (diff) | |
download | bcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.tar.gz bcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.zip |
GlobalValue: use getValueType() instead of getType()->getPointerElementType().
Reviewers: mjacob
Subscribers: jholewinski, arsenm, dsanders, dblaikie
Patch by Eduard Burtescu.
Differential Revision: http://reviews.llvm.org/D16260
llvm-svn: 257999
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index d459fc50d13..42f4701275a 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -134,7 +134,7 @@ namespace { StringRef GetGlobalTypeString(const GlobalValue &G) { // Types of GlobalVariables are always pointer types. - Type *GType = G.getType()->getElementType(); + Type *GType = G.getValueType(); // For now we support blacklisting struct types only. if (StructType *SGType = dyn_cast<StructType>(GType)) { if (!SGType->isLiteral()) @@ -166,7 +166,7 @@ class DFSanABIList { if (isIn(*GA.getParent(), Category)) return true; - if (isa<FunctionType>(GA.getType()->getElementType())) + if (isa<FunctionType>(GA.getValueType())) return SCL->inSection("fun", GA.getName(), Category); return SCL->inSection("global", GA.getName(), Category) || |