diff options
author | van Hauser <vh@thc.org> | 2022-04-25 10:14:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 10:14:19 +0200 |
commit | c7bb0a9638a8929a5b664f16032c23a55a84be70 (patch) | |
tree | 2fb8cee9897c46a53e756e898de732c63f2a8842 /instrumentation/afl-gcc-pass.so.cc | |
parent | ac80678592ea4a790ab2eedccfec4e3bc9f96447 (diff) | |
parent | ee409d18a6678c3f5948f51db8964148cae021dc (diff) | |
download | afl++-c7bb0a9638a8929a5b664f16032c23a55a84be70.tar.gz |
Merge pull request #1392 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/afl-gcc-pass.so.cc')
-rw-r--r-- | instrumentation/afl-gcc-pass.so.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/instrumentation/afl-gcc-pass.so.cc b/instrumentation/afl-gcc-pass.so.cc index 734fa170..bb5483fc 100644 --- a/instrumentation/afl-gcc-pass.so.cc +++ b/instrumentation/afl-gcc-pass.so.cc @@ -714,9 +714,11 @@ struct afl_pass : gimple_opt_pass { } + /* Returns the source file name attached to the function declaration F. If + there is no source location information, returns an empty string. */ std::string getSourceName(function *F) { - return DECL_SOURCE_FILE(F->decl); + return DECL_SOURCE_FILE(F->decl) ? DECL_SOURCE_FILE(F->decl) : ""; } |