diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-01 16:58:40 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-01 16:58:40 +0000 |
commit | 6773d388aadf0c8588e3cda343ab621397fde38c (patch) | |
tree | 3fb6f8744c4739dd948237725a958d247f3073ea /llvm/examples/BrainF/BrainFDriver.cpp | |
parent | 1f50b61329f84977a95708f4aad76b5391768f30 (diff) | |
download | llvm-6773d388aadf0c8588e3cda343ab621397fde38c.zip llvm-6773d388aadf0c8588e3cda343ab621397fde38c.tar.gz llvm-6773d388aadf0c8588e3cda343ab621397fde38c.tar.bz2 |
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
Diffstat (limited to 'llvm/examples/BrainF/BrainFDriver.cpp')
-rw-r--r-- | llvm/examples/BrainF/BrainFDriver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/examples/BrainF/BrainFDriver.cpp b/llvm/examples/BrainF/BrainFDriver.cpp index 06e77d2..0868d73 100644 --- a/llvm/examples/BrainF/BrainFDriver.cpp +++ b/llvm/examples/BrainF/BrainFDriver.cpp @@ -86,6 +86,8 @@ void addMainFunction(Module *mod) { int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " BrainF compiler\n"); + LLVMContext Context; + if (InputFilename == "") { std::cerr<<"Error: You must specify the filename of the program to " "be compiled. Use --help to see the options.\n"; @@ -124,7 +126,7 @@ int main(int argc, char **argv) { //Read the BrainF program BrainF bf; - Module *mod = bf.parse(in, 65536, cf); //64 KiB + Module *mod = bf.parse(in, 65536, cf, &Context); //64 KiB if (in != &std::cin) {delete in;} addMainFunction(mod); |