aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-02 20:21:22 +0000
committerChris Lattner <sabre@nondot.org>2010-04-02 20:21:22 +0000
commit84e679beea11ac55ed7871eec4deaccdf393de3e (patch)
treec7c12d8e81ba80c497669b36c5d44ec098791a0b /lib/VMCore
parentb494ccf02ce17318d3f2a7b2d674bec60781fc73 (diff)
downloadexternal_llvm-84e679beea11ac55ed7871eec4deaccdf393de3e.zip
external_llvm-84e679beea11ac55ed7871eec4deaccdf393de3e.tar.gz
external_llvm-84e679beea11ac55ed7871eec4deaccdf393de3e.tar.bz2
rename NewDebugLoc -> DebugLoc, prune #includes in DebugLoc.h.
This keeps around temporary typedef for clang/llvm-gcc so the build won't break when I commit this :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Core.cpp2
-rw-r--r--lib/VMCore/DebugLoc.cpp24
-rw-r--r--lib/VMCore/Metadata.cpp6
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 44d487a..634407c 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -1671,7 +1671,7 @@ void LLVMDisposeBuilder(LLVMBuilderRef Builder) {
void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {
MDNode *Loc = L ? unwrap<MDNode>(L) : NULL;
- unwrap(Builder)->SetCurrentDebugLocation(NewDebugLoc::getFromDILocation(Loc));
+ unwrap(Builder)->SetCurrentDebugLocation(DebugLoc::getFromDILocation(Loc));
}
LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder) {
diff --git a/lib/VMCore/DebugLoc.cpp b/lib/VMCore/DebugLoc.cpp
index f02ce57..f8b45ee 100644
--- a/lib/VMCore/DebugLoc.cpp
+++ b/lib/VMCore/DebugLoc.cpp
@@ -15,7 +15,7 @@ using namespace llvm;
// DebugLoc Implementation
//===----------------------------------------------------------------------===//
-MDNode *NewDebugLoc::getScope(const LLVMContext &Ctx) const {
+MDNode *DebugLoc::getScope(const LLVMContext &Ctx) const {
if (ScopeIdx == 0) return 0;
if (ScopeIdx > 0) {
@@ -32,7 +32,7 @@ MDNode *NewDebugLoc::getScope(const LLVMContext &Ctx) const {
return Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].first.get();
}
-MDNode *NewDebugLoc::getInlinedAt(const LLVMContext &Ctx) const {
+MDNode *DebugLoc::getInlinedAt(const LLVMContext &Ctx) const {
// Positive ScopeIdx is an index into ScopeRecords, which has no inlined-at
// position specified. Zero is invalid.
if (ScopeIdx >= 0) return 0;
@@ -44,8 +44,8 @@ MDNode *NewDebugLoc::getInlinedAt(const LLVMContext &Ctx) const {
}
/// Return both the Scope and the InlinedAt values.
-void NewDebugLoc::getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA,
- const LLVMContext &Ctx) const {
+void DebugLoc::getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA,
+ const LLVMContext &Ctx) const {
if (ScopeIdx == 0) {
Scope = IA = 0;
return;
@@ -69,9 +69,9 @@ void NewDebugLoc::getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA,
}
-NewDebugLoc NewDebugLoc::get(unsigned Line, unsigned Col,
- MDNode *Scope, MDNode *InlinedAt) {
- NewDebugLoc Result;
+DebugLoc DebugLoc::get(unsigned Line, unsigned Col,
+ MDNode *Scope, MDNode *InlinedAt) {
+ DebugLoc Result;
// If no scope is available, this is an unknown location.
if (Scope == 0) return Result;
@@ -95,7 +95,7 @@ NewDebugLoc NewDebugLoc::get(unsigned Line, unsigned Col,
/// getAsMDNode - This method converts the compressed DebugLoc node into a
/// DILocation compatible MDNode.
-MDNode *NewDebugLoc::getAsMDNode(const LLVMContext &Ctx) const {
+MDNode *DebugLoc::getAsMDNode(const LLVMContext &Ctx) const {
if (isUnknown()) return 0;
MDNode *Scope, *IA;
@@ -111,12 +111,12 @@ MDNode *NewDebugLoc::getAsMDNode(const LLVMContext &Ctx) const {
return MDNode::get(Ctx2, &Elts[0], 4);
}
-/// getFromDILocation - Translate the DILocation quad into a NewDebugLoc.
-NewDebugLoc NewDebugLoc::getFromDILocation(MDNode *N) {
- if (N == 0 || N->getNumOperands() != 4) return NewDebugLoc();
+/// getFromDILocation - Translate the DILocation quad into a DebugLoc.
+DebugLoc DebugLoc::getFromDILocation(MDNode *N) {
+ if (N == 0 || N->getNumOperands() != 4) return DebugLoc();
MDNode *Scope = dyn_cast_or_null<MDNode>(N->getOperand(2));
- if (Scope == 0) return NewDebugLoc();
+ if (Scope == 0) return DebugLoc();
unsigned LineNo = 0, ColNo = 0;
if (ConstantInt *Line = dyn_cast_or_null<ConstantInt>(N->getOperand(0)))
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index 73e6091..72de032 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/lib/VMCore/Metadata.cpp
@@ -425,7 +425,7 @@ MDNode *Instruction::getMetadataImpl(const char *Kind) const {
}
void Instruction::setDbgMetadata(MDNode *Node) {
- DbgLoc = NewDebugLoc::getFromDILocation(Node);
+ DbgLoc = DebugLoc::getFromDILocation(Node);
}
/// setMetadata - Set the metadata of of the specified kind to the specified
@@ -436,7 +436,7 @@ void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
// Handle 'dbg' as a special case since it is not stored in the hash table.
if (KindID == LLVMContext::MD_dbg) {
- DbgLoc = NewDebugLoc::getFromDILocation(Node);
+ DbgLoc = DebugLoc::getFromDILocation(Node);
return;
}
@@ -549,7 +549,7 @@ getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl<std::pair<unsigned,
/// removeAllMetadata - Remove all metadata from this instruction.
void Instruction::removeAllMetadata() {
assert(hasMetadata() && "Caller should check");
- DbgLoc = NewDebugLoc();
+ DbgLoc = DebugLoc();
if (hasMetadataHashEntry()) {
getContext().pImpl->MetadataStore.erase(this);
setHasMetadataHashEntry(false);