summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2014-09-15 07:50:36 +0000
committerFrederic Riss <friss@apple.com>2014-09-15 07:50:36 +0000
commit36acf0fb8b8627bd586fe7df8872b1c8a17ab7cd (patch)
treed1b634ac261eb7df0ab9f6309027887195e86bab /llvm/lib
parent4e126a0011973a63f2e674c2a08ab5f987bd0544 (diff)
downloadbcm5719-llvm-36acf0fb8b8627bd586fe7df8872b1c8a17ab7cd.tar.gz
bcm5719-llvm-36acf0fb8b8627bd586fe7df8872b1c8a17ab7cd.zip
Move replaceAllUsesWith() from DIType to DIDescriptor.
RAUW was only used on DIType to merge declarations and full definitions of types. In order to support the same functionality for functions and global variables, move the function up type DI type hierarchy to the common parent of DIType, DISubprogram and DIVariable which is DIDescriptor. This functionality will be exercized when we add the code to emit imported declarations for forward declared function/variables. Reviewers: echristo, dblaikie, aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5325 llvm-svn: 217748
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index b6f9b51b3d1..71c32fc969d 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -363,7 +363,7 @@ bool DIDescriptor::isImportedEntity() const {
/// replaceAllUsesWith - Replace all uses of the MDNode used by this
/// type with the one in the passed descriptor.
-void DIType::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) {
+void DIDescriptor::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) {
assert(DbgNode && "Trying to replace an unverified type!");
@@ -389,7 +389,7 @@ void DIType::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) {
/// replaceAllUsesWith - Replace all uses of the MDNode used by this
/// type with the one in D.
-void DIType::replaceAllUsesWith(MDNode *D) {
+void DIDescriptor::replaceAllUsesWith(MDNode *D) {
assert(DbgNode && "Trying to replace an unverified type!");
assert(DbgNode != D && "This replacement should always happen");
OpenPOWER on IntegriCloud