From d4dca050bb3b9121683838ae2697b8b9bac42f43 Mon Sep 17 00:00:00 2001 From: Lightech Date: Sat, 10 Apr 2021 09:18:28 +0700 Subject: [PATCH] Relocate screenshots --- README.md | 12 ++++++------ .../DisableBitcode.png | Bin .../ObjCBridgeHeader.png | Bin Screenshot1.png => Screenshots/Screenshot1.png | Bin Screenshot2.png => Screenshots/Screenshot2.png | Bin .../Screenshot_Real_iPhone1.png | Bin .../Screenshot_Real_iPhone2.png | Bin 7 files changed, 6 insertions(+), 6 deletions(-) rename DisableBitcode.png => Screenshots/DisableBitcode.png (100%) rename ObjCBridgeHeader.png => Screenshots/ObjCBridgeHeader.png (100%) rename Screenshot1.png => Screenshots/Screenshot1.png (100%) rename Screenshot2.png => Screenshots/Screenshot2.png (100%) rename Screenshot_Real_iPhone1.png => Screenshots/Screenshot_Real_iPhone1.png (100%) rename Screenshot_Real_iPhone2.png => Screenshots/Screenshot_Real_iPhone2.png (100%) diff --git a/README.md b/README.md index da2f44a..d320ada 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ LLVM on iOS The goal of this project is to illustrate how to use LLVM + Clang to provide an iOS app with some scripting capability. -![Edit the program screenshot](Screenshot1.png) -![Interpret the program screenshot](Screenshot2.png) +![Edit the program screenshot](Screenshots/Screenshot1.png) +![Interpret the program screenshot](Screenshots/Screenshot2.png) For the eager reader, we provide a sample iOS app project in the [Sample/](Sample) folder which has **NO license attached** so feel free to do whatever you want with it. In this app, we use Clang's C interpreter example located in `examples/clang-interpreter/main.cpp` of Clang source code to _interpret a simple C++ program_ and _print out the output on the iOS app's user interface_. @@ -50,8 +50,8 @@ By pulling out the device crash logs, the reason turns out to be the fact the [c If there is compilation error, the error message was printed out instead of crashing as expected: -![Add #include non-existing header](Screenshot_Real_iPhone1.png) -![Compilation error was printed out](Screenshot_Real_iPhone2.png) +![Add #include non-existing header](Screenshots/Screenshot_Real_iPhone1.png) +![Compilation error was printed out](Screenshots/Screenshot_Real_iPhone2.png) **Note**: It does work if one [launches the app from Xcode](https://9to5mac.com/2020/11/06/ios-14-2-brings-jit-compilation-support-which-enables-emulation-apps-at-full-performance/) though. @@ -142,13 +142,13 @@ Set it to `PROJECT_NAME/LLVMBridge.h` or if you are using more than just LLVM, a **Note**: Only Objective-C classes in *Objective-C Bridging Header* are visible to Swift! -![Objective-C Bridging Header Setting](ObjCBridgeHeader.png) +![Objective-C Bridging Header Setting](Screenshots/ObjCBridgeHeader.png) At this point, we should be able to run the project on iOS simulator. **To build the app for real iOS devices, an extra step is needed.** 4. Since we are using a bunch of precompiled static libraries (and not the actual C++ source code in our app), we need to disable bitcode. Search for `bitcod` and set **Enable Bitcode** setting to `No`. -![Bitcode Setting](DisableBitcode.png) +![Bitcode Setting](Screenshots/DisableBitcode.png) Now you are ready to make use of LLVM glory. diff --git a/DisableBitcode.png b/Screenshots/DisableBitcode.png similarity index 100% rename from DisableBitcode.png rename to Screenshots/DisableBitcode.png diff --git a/ObjCBridgeHeader.png b/Screenshots/ObjCBridgeHeader.png similarity index 100% rename from ObjCBridgeHeader.png rename to Screenshots/ObjCBridgeHeader.png diff --git a/Screenshot1.png b/Screenshots/Screenshot1.png similarity index 100% rename from Screenshot1.png rename to Screenshots/Screenshot1.png diff --git a/Screenshot2.png b/Screenshots/Screenshot2.png similarity index 100% rename from Screenshot2.png rename to Screenshots/Screenshot2.png diff --git a/Screenshot_Real_iPhone1.png b/Screenshots/Screenshot_Real_iPhone1.png similarity index 100% rename from Screenshot_Real_iPhone1.png rename to Screenshots/Screenshot_Real_iPhone1.png diff --git a/Screenshot_Real_iPhone2.png b/Screenshots/Screenshot_Real_iPhone2.png similarity index 100% rename from Screenshot_Real_iPhone2.png rename to Screenshots/Screenshot_Real_iPhone2.png