summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-06-09 22:53:16 +0000
committerRichard Trieu <rtrieu@google.com>2014-06-09 22:53:16 +0000
commitf31ecd39273231fccc53785f518023d70f85a02a (patch)
treec6f05f5eef00db27c074ec3b5e900c63df3e0c7c /lib/Transforms/Instrumentation
parent8aeca44558234ae3703c565854c31d38034e56cb (diff)
downloadllvm-f31ecd39273231fccc53785f518023d70f85a02a.tar.gz
llvm-f31ecd39273231fccc53785f518023d70f85a02a.tar.bz2
llvm-f31ecd39273231fccc53785f518023d70f85a02a.tar.xz
Removing an "if (!this)" check from two print methods. The condition will
never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/DebugIR.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp
index 18bda1a320..1bfef574dd 100644
--- a/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -352,6 +352,7 @@ private:
}
std::string getTypeName(Type *T) {
+ assert(T != nullptr && "Expecting non-null Type");
std::string TypeName;
raw_string_ostream TypeStream(TypeName);
T->print(TypeStream);