summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-13 06:04:29 +0000
committerChris Lattner <sabre@nondot.org>2009-10-13 06:04:29 +0000
commit92ae16b0ae05dd1128d5492faaac9cdb15c7476a (patch)
tree3a85625b5ea0f61f54727716e35cc16218924ad1 /clang/lib/CodeGen/CodeGenFunction.cpp
parentdd7eaad7d4ba1869092067f23c2a1d25529fb451 (diff)
downloadbcm5719-llvm-92ae16b0ae05dd1128d5492faaac9cdb15c7476a.tar.gz
bcm5719-llvm-92ae16b0ae05dd1128d5492faaac9cdb15c7476a.zip
number address-taken labels from 1. This allows 0 to be used as a sentinel
for a null pointer. In other words, "&&foo != NULL" will always work out to true. llvm-svn: 83948
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 10c10d9a8a3..2d4dc455f22 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -444,7 +444,7 @@ void CodeGenFunction::ErrorUnsupported(const Stmt *S, const char *Type,
unsigned CodeGenFunction::GetIDForAddrOfLabel(const LabelStmt *L) {
// Use LabelIDs.size() as the new ID if one hasn't been assigned.
- return LabelIDs.insert(std::make_pair(L, LabelIDs.size())).first->second;
+ return LabelIDs.insert(std::make_pair(L, LabelIDs.size()+1)).first->second;
}
void CodeGenFunction::EmitMemSetToZero(llvm::Value *DestPtr, QualType Ty) {
OpenPOWER on IntegriCloud