aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-31 20:08:37 +0000
committerChris Lattner <sabre@nondot.org>2009-10-31 20:08:37 +0000
commit7d83ebcadd725d050cc58962e9b7c4312d676e7f (patch)
treeefdb3c359fa548ada932f522239be84ab602df20 /include
parente3246fc6ab4ae7599fa1b7aa1b37107a843b2032 (diff)
downloadexternal_llvm-7d83ebcadd725d050cc58962e9b7c4312d676e7f.zip
external_llvm-7d83ebcadd725d050cc58962e9b7c4312d676e7f.tar.gz
external_llvm-7d83ebcadd725d050cc58962e9b7c4312d676e7f.tar.bz2
Make blockaddress(@func, null) be valid, and make 'deleting a basic
block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 99928d9..f493ee6 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -567,6 +567,10 @@ public:
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
Function *getFunction() const { return (Function*)Op<0>().get(); }
+
+ /// getBasicBlock - This returns the block associated with this BlockAddress.
+ /// Note that this can return null if the block this originally referred to
+ /// was deleted.
BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); }
/// isNullValue - Return true if this is the value that would be returned by