summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-15 04:33:49 +0000
committerDan Gohman <gohman@apple.com>2010-04-15 04:33:49 +0000
commitae541aad5c36cb3e4256514447d1f81e253079c7 (patch)
treef2d8e82324f62acca48f90c0535719daafc22c17 /include/llvm/CodeGen/MachineFunction.h
parentdc7d6c9ddc1d1527a06f61b5da806781ff047709 (diff)
downloadllvm-ae541aad5c36cb3e4256514447d1f81e253079c7.tar.gz
llvm-ae541aad5c36cb3e4256514447d1f81e253079c7.tar.bz2
llvm-ae541aad5c36cb3e4256514447d1f81e253079c7.tar.xz
Add more const qualifiers for LLVM IR pointers in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index b3609c2ea7..09d33b16d3 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -70,7 +70,7 @@ struct MachineFunctionInfo {
};
class MachineFunction {
- Function *Fn;
+ const Function *Fn;
const TargetMachine &Target;
MCContext &Ctx;
MachineModuleInfo &MMI;
@@ -124,8 +124,8 @@ class MachineFunction {
MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
void operator=(const MachineFunction&); // DO NOT IMPLEMENT
public:
- MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum,
- MachineModuleInfo &MMI);
+ MachineFunction(const Function *Fn, const TargetMachine &TM,
+ unsigned FunctionNum, MachineModuleInfo &MMI);
~MachineFunction();
MachineModuleInfo &getMMI() const { return MMI; }
@@ -133,7 +133,7 @@ public:
/// getFunction - Return the LLVM function that this machine code represents
///
- Function *getFunction() const { return Fn; }
+ const Function *getFunction() const { return Fn; }
/// getFunctionNumber - Return a unique ID for the current function.
///