r331802 - Add missing newlines to cl::extrahelp uses

2018-05-08 Thread Stephane Sezer via cfe-commits
Author: sas
Date: Tue May  8 12:46:29 2018
New Revision: 331802

URL: http://llvm.org/viewvc/llvm-project?rev=331802&view=rev
Log:
Add missing newlines to cl::extrahelp uses

Modified:
cfe/trunk/docs/LibASTMatchersTutorial.rst
cfe/trunk/docs/LibTooling.rst
cfe/trunk/include/clang/Tooling/CommonOptionsParser.h

Modified: cfe/trunk/docs/LibASTMatchersTutorial.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibASTMatchersTutorial.rst?rev=331802&r1=331801&r2=331802&view=diff
==
--- cfe/trunk/docs/LibASTMatchersTutorial.rst (original)
+++ cfe/trunk/docs/LibASTMatchersTutorial.rst Tue May  8 12:46:29 2018
@@ -146,7 +146,7 @@ documentation `_.
   static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
 
   // A help message for this specific tool can be added afterwards.
-  static cl::extrahelp MoreHelp("\nMore help text...");
+  static cl::extrahelp MoreHelp("\nMore help text...\n");
 
   int main(int argc, const char **argv) {
 CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);

Modified: cfe/trunk/docs/LibTooling.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibTooling.rst?rev=331802&r1=331801&r2=331802&view=diff
==
--- cfe/trunk/docs/LibTooling.rst (original)
+++ cfe/trunk/docs/LibTooling.rst Tue May  8 12:46:29 2018
@@ -130,7 +130,7 @@ version of this example tool is also che
   static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
 
   // A help message for this specific tool can be added afterwards.
-  static cl::extrahelp MoreHelp("\nMore help text...");
+  static cl::extrahelp MoreHelp("\nMore help text...\n");
 
   int main(int argc, const char **argv) {
 CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);

Modified: cfe/trunk/include/clang/Tooling/CommonOptionsParser.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/CommonOptionsParser.h?rev=331802&r1=331801&r2=331802&view=diff
==
--- cfe/trunk/include/clang/Tooling/CommonOptionsParser.h (original)
+++ cfe/trunk/include/clang/Tooling/CommonOptionsParser.h Tue May  8 12:46:29 
2018
@@ -52,7 +52,7 @@ namespace tooling {
 ///
 /// static cl::OptionCategory MyToolCategory("My tool options");
 /// static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
-/// static cl::extrahelp MoreHelp("\nMore help text...");
+/// static cl::extrahelp MoreHelp("\nMore help text...\n");
 /// static cl::opt YourOwnOption(...);
 /// ...
 ///


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r333302 - Convert clang-interpreter to ORC JIT API

2018-05-25 Thread Stephane Sezer via cfe-commits
Author: sas
Date: Fri May 25 13:23:42 2018
New Revision: 02

URL: http://llvm.org/viewvc/llvm-project?rev=02&view=rev
Log:
Convert clang-interpreter to ORC JIT API

Summary: This mostly re-uses code from the KaleidoscopeJIT example.

Reviewers: ddunbar, lhames

Reviewed By: lhames

Subscribers: mgrang, alexshap, mgorny, xiaobai, cfe-commits

Differential Revision: https://reviews.llvm.org/D45897

Removed:
cfe/trunk/examples/clang-interpreter/Invoke.cpp
cfe/trunk/examples/clang-interpreter/Invoke.h
cfe/trunk/examples/clang-interpreter/Manager.cpp
cfe/trunk/examples/clang-interpreter/Manager.h
Modified:
cfe/trunk/examples/clang-interpreter/CMakeLists.txt
cfe/trunk/examples/clang-interpreter/main.cpp

Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/CMakeLists.txt?rev=02&r1=01&r2=02&view=diff
==
--- cfe/trunk/examples/clang-interpreter/CMakeLists.txt (original)
+++ cfe/trunk/examples/clang-interpreter/CMakeLists.txt Fri May 25 13:23:42 2018
@@ -12,8 +12,6 @@ set(LLVM_LINK_COMPONENTS
 
 add_clang_executable(clang-interpreter
   main.cpp
-  Invoke.cpp
-  Manager.cpp
   )
 
 add_dependencies(clang-interpreter

Removed: cfe/trunk/examples/clang-interpreter/Invoke.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/Invoke.cpp?rev=01&view=auto
==
--- cfe/trunk/examples/clang-interpreter/Invoke.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/Invoke.cpp (removed)
@@ -1,31 +0,0 @@
-//==-- examples/clang-interpreter/Invoke.cpp - Clang C Interpreter Example 
-==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#include "Invoke.h"
-
-#include 
-#include 
-
-namespace interpreter {
-
-int TryIt(llvm::ExecutionEngine *EE, llvm::Function *EntryFn,
-  const std::vector &Args, char *const *EnvP,
-  Invoker Invoke) {
-  int Res = -1;
-  try {
-Res = Invoke(EE, EntryFn, Args, EnvP);
-  } catch (const std::exception &E) {
-std::cout << "Caught '" << E.what() << "'\n";
-  } catch (...) {
-std::cout << "Unknown exception\n";
-  }
-  return Res;
-}
-
-}

Removed: cfe/trunk/examples/clang-interpreter/Invoke.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/Invoke.h?rev=01&view=auto
==
--- cfe/trunk/examples/clang-interpreter/Invoke.h (original)
+++ cfe/trunk/examples/clang-interpreter/Invoke.h (removed)
@@ -1,34 +0,0 @@
-//===-- examples/clang-interpreter/Invoke.h - Clang C Interpreter Example 
-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#ifndef CLANG_EXAMPLE_INTERPRETER_INVOKE_H
-#define CLANG_EXAMPLE_INTERPRETER_INVOKE_H
-
-namespace llvm {
-  class ExecutionEngine;
-  class Function;
-}
-
-#include 
-#include 
-
-namespace interpreter {
-
-typedef std::vector InvokeArgs;
-
-typedef int (*Invoker)(llvm::ExecutionEngine *EE, llvm::Function *EntryFn,
-   const InvokeArgs &Args, char *const *EnvP);
-
-int TryIt(llvm::ExecutionEngine *EE, llvm::Function *EntryFn,
-  const InvokeArgs &Args, char *const *EnvP,
-  Invoker Invoke);
-
-} // interpreter
-
-#endif // CLANG_EXAMPLE_INTERPRETER_INVOKE_H

Removed: cfe/trunk/examples/clang-interpreter/Manager.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/Manager.cpp?rev=01&view=auto
==
--- cfe/trunk/examples/clang-interpreter/Manager.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/Manager.cpp (removed)
@@ -1,328 +0,0 @@
-//==-- examples/clang-interpreter/Manager.cpp - Clang C Interpreter Example 
-=//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#include "Manager.h"
-
-#ifdef CLANG_INTERPRETER_WIN_EXCEPTIONS
-#include "llvm/Support/DynamicLibrary.h"
-
-#define WIN32_LEAN_AND_MEAN
-#define NOGDI
-#define NOMINMAX
-#include 
-#endif
-
-namespace interpreter {
-
-using namespace llvm;
-
-void SingleSectionMemoryManager::Block::Reset(uint8_t *Ptr, uintptr_t Size) {
-  assert(Ptr != nullptr && "Bad allocation");
-