Forráskód Böngészése

Changed exit to ios_exit to avoid crashing the program

HOLZSCHUCH Nicolas 5 éve
szülő
commit
7b8318293e
2 módosított fájl, 14 hozzáadás és 0 törlés
  1. 7 0
      Common/ErrorHandler.cpp
  2. 7 0
      tools/lld/lld.cpp

+ 7 - 0
Common/ErrorHandler.cpp

@@ -22,6 +22,13 @@
 #include <unistd.h>
 #include <unistd.h>
 #endif
 #endif
 
 
+#ifdef __APPLE__
+#include <TargetConditionals.h>
+#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
+#include "ios_error.h"
+#endif
+#endif
+
 using namespace llvm;
 using namespace llvm;
 using namespace lld;
 using namespace lld;
 
 

+ 7 - 0
tools/lld/lld.cpp

@@ -38,6 +38,13 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Path.h"
 #include <cstdlib>
 #include <cstdlib>
 
 
+#ifdef __APPLE__
+#include <TargetConditionals.h>
+#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
+#include "ios_error.h"
+#endif
+#endif
+
 using namespace lld;
 using namespace lld;
 using namespace llvm;
 using namespace llvm;
 using namespace llvm::sys;
 using namespace llvm::sys;