[llvm] r358082 - Revert "[LLVM-C] Correct The Current Debug Location Accessors"

Sam McCall via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 06:29:37 PDT 2019


Author: sammccall
Date: Wed Apr 10 06:29:37 2019
New Revision: 358082

URL: http://llvm.org/viewvc/llvm-project?rev=358082&view=rev
Log:
Revert "[LLVM-C] Correct The Current Debug Location Accessors"

This reverts commit r358039, which added symbols that conflict with the
Go bindings.

Modified:
    llvm/trunk/include/llvm-c/Core.h
    llvm/trunk/lib/IR/Core.cpp

Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=358082&r1=358081&r2=358082&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Wed Apr 10 06:29:37 2019
@@ -3510,42 +3510,9 @@ void LLVMInsertIntoBuilderWithName(LLVMB
 void LLVMDisposeBuilder(LLVMBuilderRef Builder);
 
 /* Metadata */
-
-/**
- * Get location information used by debugging information.
- *
- * @see llvm::IRBuilder::getCurrentDebugLocation()
- */
-LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder);
-
-/**
- * Set location information used by debugging information.
- *
- * To clear the location metadata of the given instruction, pass NULL to \p Loc.
- *
- * @see llvm::IRBuilder::SetCurrentDebugLocation()
- */
-void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc);
-
-/**
- * Attempts to set the debug location for the given instruction using the
- * current debug location for the given builder.  If the builder has no current
- * debug location, this function is a no-op.
- *
- * @see llvm::IRBuilder::SetInstDebugLocation()
- */
-void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
-  
-/**
- * Deprecated: Passing the NULL location will crash.
- * Use LLVMGetCurrentDebugLocation2 instead.
- */
 void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L);
-/**
- * Deprecated: Returning the NULL location will crash.
- * Use LLVMGetCurrentDebugLocation2 instead.
- */
 LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder);
+void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
 
 /* Terminators */
 LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef);

Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=358082&r1=358081&r2=358082&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Wed Apr 10 06:29:37 2019
@@ -3006,17 +3006,6 @@ void LLVMDisposeBuilder(LLVMBuilderRef B
 
 /*--.. Metadata builders ...................................................--*/
 
-LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder) {
-  return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode());
-}
-
-void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc) {
-  if (Loc)
-    unwrap(Builder)->SetCurrentDebugLocation(DebugLoc(unwrap<MDNode>(Loc)));
-  else
-    unwrap(Builder)->SetCurrentDebugLocation(DebugLoc());
-}
-
 void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {
   MDNode *Loc =
       L ? cast<MDNode>(unwrap<MetadataAsValue>(L)->getMetadata()) : nullptr;
@@ -3033,6 +3022,7 @@ void LLVMSetInstDebugLocation(LLVMBuilde
   unwrap(Builder)->SetInstDebugLocation(unwrap<Instruction>(Inst));
 }
 
+
 /*--.. Instruction builders ................................................--*/
 
 LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) {




More information about the llvm-commits mailing list