aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-17 22:00:08 +0000
committerChris Lattner <sabre@nondot.org>2006-08-17 22:00:08 +0000
commit5ea64fd9eb0027ad20a66ea29211eef79d8842a0 (patch)
treecf7e23de8d8fbe6719bf9f2371aacbda97de7827 /include/llvm/CodeGen/MachineFunction.h
parentc0431fe1ca52c5d159c604957f337aa3eb1ec3d3 (diff)
Constify some methods. Patch provided by Anton Vayvod, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 0f511e3d91..340e2f936b 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -165,6 +165,11 @@ public:
return static_cast<Ty*>(MFInfo);
}
+ template<typename Ty>
+ const Ty *getInfo() const {
+ return const_cast<MachineFunction*>(this)->getInfo<Ty>();
+ }
+
/// setUsedPhysRegs - The register allocator should call this to initialized
/// the UsedPhysRegs set. This should be passed a new[]'d array with entries
/// for all of the physical registers that the target supports. Each array