about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-common.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-26 21:22:24 +0200
committervan Hauser <vh@thc.org>2020-08-26 21:22:24 +0200
commit3e8beaafc8ce6d444575074f8c45c9a9020d9b54 (patch)
treedc799cbf29147c5bbf66c74e87f2037026991aa2 /llvm_mode/afl-llvm-common.cc
parent33e58c1d4e6c41d9ab18935325b5794e28285b4f (diff)
downloadafl++-3e8beaafc8ce6d444575074f8c45c9a9020d9b54.tar.gz
fixing wrong fatal ...
Diffstat (limited to 'llvm_mode/afl-llvm-common.cc')
-rw-r--r--llvm_mode/afl-llvm-common.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm_mode/afl-llvm-common.cc b/llvm_mode/afl-llvm-common.cc
index 59ad65c9..7dd5a02a 100644
--- a/llvm_mode/afl-llvm-common.cc
+++ b/llvm_mode/afl-llvm-common.cc
@@ -344,13 +344,14 @@ static std::string getSourceName(llvm::Function *F) {
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7)
   if (Loc) {
 
+    StringRef instFilename;
     DILocation *cDILoc = dyn_cast<DILocation>(Loc.getAsMDNode());
 
-    if (!cDILoc) {
-      FATAL("DebugLoc is no DILocation");
-    }
+    if (cDILoc) {
+
+      instFilename = cDILoc->getFilename();
 
-    StringRef instFilename = cDILoc->getFilename();
+    }
 
     if (instFilename.str().empty()) {