llvm.org GIT mirror llvm / 2cc3436
Revert "[LLVM-C] Correct The Current Debug Location Accessors" This reverts commit r358039, which added symbols that conflict with the Go bindings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358082 91177308-0d34-0410-b5e6-96231b3b80d8 Sam McCall 4 months ago
2 changed file(s) with 3 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
35093509 void LLVMDisposeBuilder(LLVMBuilderRef Builder);
35103510
35113511 /* Metadata */
3512
3513 /**
3514 * Get location information used by debugging information.
3515 *
3516 * @see llvm::IRBuilder::getCurrentDebugLocation()
3517 */
3518 LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder);
3519
3520 /**
3521 * Set location information used by debugging information.
3522 *
3523 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
3524 *
3525 * @see llvm::IRBuilder::SetCurrentDebugLocation()
3526 */
3527 void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc);
3528
3529 /**
3530 * Attempts to set the debug location for the given instruction using the
3531 * current debug location for the given builder. If the builder has no current
3532 * debug location, this function is a no-op.
3533 *
3534 * @see llvm::IRBuilder::SetInstDebugLocation()
3535 */
3512 void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L);
3513 LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder);
35363514 void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
3537
3538 /**
3539 * Deprecated: Passing the NULL location will crash.
3540 * Use LLVMGetCurrentDebugLocation2 instead.
3541 */
3542 void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L);
3543 /**
3544 * Deprecated: Returning the NULL location will crash.
3545 * Use LLVMGetCurrentDebugLocation2 instead.
3546 */
3547 LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder);
35483515
35493516 /* Terminators */
35503517 LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef);
30053005
30063006 /*--.. Metadata builders ...................................................--*/
30073007
3008 LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder) {
3009 return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode());
3010 }
3011
3012 void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc) {
3013 if (Loc)
3014 unwrap(Builder)->SetCurrentDebugLocation(DebugLoc(unwrap(Loc)));
3015 else
3016 unwrap(Builder)->SetCurrentDebugLocation(DebugLoc());
3017 }
3018
30193008 void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {
30203009 MDNode *Loc =
30213010 L ? cast(unwrap(L)->getMetadata()) : nullptr;
30313020 void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst) {
30323021 unwrap(Builder)->SetInstDebugLocation(unwrap(Inst));
30333022 }
3023
30343024
30353025 /*--.. Instruction builders ................................................--*/
30363026