aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Annotation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Annotation.cpp')
-rw-r--r--lib/Support/Annotation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp
index 9d5e5457d9..3ecc42f782 100644
--- a/lib/Support/Annotation.cpp
+++ b/lib/Support/Annotation.cpp
@@ -57,9 +57,9 @@ AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID
IDMapType::iterator I = IDMap->find(Name);
if (I == IDMap->end()) {
(*IDMap)[Name] = IDCounter++; // Add a new element
- return IDCounter-1;
+ return AnnotationID(IDCounter-1);
}
- return I->second;
+ return AnnotationID(I->second);
}
// getID - Name -> ID + registration of a factory function for demand driven