From: Simon Dardis Date: Sat, 29 Apr 2017 16:31:40 +0000 (+0000) Subject: [mips][FastISel] Fix a nullptr deference. X-Git-Tag: android-x86-7.1-r4~16939 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d9e74d6d4a5534346514b89e30f02bb602f97d3b;p=android-x86%2Fexternal-llvm.git [mips][FastISel] Fix a nullptr deference. r301392 introduced a potential nullptr deference causing compilation failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301746 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/MipsFastISel.cpp b/lib/Target/Mips/MipsFastISel.cpp index d1ec77e297d..21c99da0922 100644 --- a/lib/Target/Mips/MipsFastISel.cpp +++ b/lib/Target/Mips/MipsFastISel.cpp @@ -1263,7 +1263,8 @@ bool MipsFastISel::finishCall(CallLoweringInfo &CLI, MVT RetVT, MipsCCState CCInfo(CC, false, *FuncInfo.MF, RVLocs, *Context); CCInfo.AnalyzeCallResult(CLI.Ins, RetCC_Mips, CLI.RetTy, - CLI.Symbol->getName().data()); + CLI.Symbol ? CLI.Symbol->getName().data() + : nullptr); // Only handle a single return value. if (RVLocs.size() != 1)