Files
swift-mirror/tools/SourceKit/lib/SwiftLang/SwiftInvocation.h
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00

34 lines
825 B
C++

#ifndef LLVM_SOURCEKIT_LIB_SWIFTLANG_SWIFTINVOCATION_H
#define LLVM_SOURCEKIT_LIB_SWIFTLANG_SWIFTINVOCATION_H
#include "swift/Basic/ThreadSafeRefCounted.h"
#include <vector>
namespace swift {
class CompilerInvocation;
}
namespace SourceKit {
class SwiftASTManager;
/// Encompasses an invocation for getting an AST. This is used to control AST
/// sharing among different requests.
class SwiftInvocation : public swift::ThreadSafeRefCountedBase<SwiftInvocation> {
public:
~SwiftInvocation();
struct Implementation;
Implementation &Impl;
void applyTo(swift::CompilerInvocation &CompInvok) const;
void raw(std::vector<std::string> &Args, std::string &PrimaryFile) const;
private:
SwiftInvocation(Implementation &Impl) : Impl(Impl) { }
friend class SwiftASTManager;
};
} // namespace SourceKit.
#endif