diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-09 01:47:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-09 01:47:02 +0000 |
commit | 51efe56116a6283ba707cfb8bf8b4e0b13cb41ac (patch) | |
tree | 001dea6c1d1b05fca919f59c05e4d66c30fb124e | |
parent | 84efc04f41b9760f339717834373db19a74c14fe (diff) |
Don't crash when our FunctionDecl has a non-identifier name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61970 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/RewriteObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index b20bbb349e..62aed798e4 100644 --- a/Driver/RewriteObjC.cpp +++ b/Driver/RewriteObjC.cpp @@ -1942,7 +1942,8 @@ void RewriteObjC::SynthGetProtocolFunctionDecl() { void RewriteObjC::RewriteFunctionDecl(FunctionDecl *FD) { // declared in <objc/objc.h> - if (strcmp(FD->getNameAsCString(), "sel_registerName") == 0) { + if (FD->getIdentifier() && + strcmp(FD->getNameAsCString(), "sel_registerName") == 0) { SelGetUidFunctionDecl = FD; return; } |