This is basically the same as doing a :print_decl on every decl in the module,
except that it does not print extensions that come from other modules, and
/does/ print extensions and operators that come from this module.
Does not yet work for Clang modules or the Builtin module.
Swift SVN r7601
with the new definite init model (well, it always is, but not IRGen explodes if
they aren't run instead of just producing broken code).
This is also a step towards rdar://14819740
Swift SVN r7575
helper function which is shared by the compiler and the immediate mode
stuff. This way, diagnostic passes are run on modules imported by "-i".
Also add include guards and clean up headers a lot.
Swift SVN r7568
...and use it to load frameworks and libraries in immediate modes (-i and
the REPL), replacing a walk of visible modules that checked if any imported
modules were Clang modules.
Swift SVN r7488
This ensures that libSwiftAppKit.dylib gets loaded if we import Cocoa.
It's not perfect because we really should process /all/ modules, not just
visible modules...but it does fix <rdar://problem/14716017>. The long-term
fix is proper autolinking.
Swift SVN r7304
integration
Motivation: libIDE clients should be simple, and they should not have to
translate token-based SourceRanges to character locations.
This also allows us to remove the dependency of DiagnosticConsumer on the
Lexer. Now the DiagnosticEngine translates the diagnostics to CharSourceRanges
and passes character-based ranges to the DiagnosticConsumer.
Swift SVN r7173
Replace uses of it with the newly introduced constructor that accepts a buffer ID.
The StringRef constructor was rather unsafe since it had the implicit requirement that the StringRef
was null-terminated.
Swift SVN r6942
gen pass has had it disabled for some time, so snip the last few uses
in the REPL and zap it.
Goodbye old friend, you were a very useful stopgap.
Swift SVN r6885
around everywhere
Fixes:
rdar://14585108 Code completion does not work at the beginning of the file
rdar://14592634 Code completion returns zero results at EOF in a function
without a closing brace
Swift SVN r6820
This allows us to do code completion inside incomplete function bodies in REPL.
This workaround was added because the bug it fixes is a regression from the
previous code completion engine.
Swift SVN r6746
This makes it very clear who is depending on special behavior at the
module level. Doing isa<ClangModule> now requires a header import; anything
more requires actually linking against the ClangImporter library.
If the current source file really can't import ClangModule.h, it can
still fall back to checking against the DeclContext's getContextKind()
(and indeed AST currently does in a few places).
Swift SVN r6695
fix the build. This isn't a proper fix (we should start putting out new attributes
on llvm::Function's, but getting the build working again seems important.
Swift SVN r6584
importing them
Because going through the import for every code completion request is slow,
Clang code completion results are cached in the CodeCompletionContext. The
cache needs to be invalidated whenever a new Clang module is loaded. In order
to implement this, ModuleLoadListener class was added.
Swift SVN r6505
the containing DeclContext
Fixes a few FIXMEs in code completion where we were providing results that
refer to generic arguments outside of their scope.
Swift SVN r6370
is documented: look up members of a type that are visible from a specific
module. It does not matter much now, but when we have access control, it will.
Before this change, lookupVisibleDecls() tried to guess the *defining* module
of the type, and gave up if it could not. It forced us to duplicate some
lookup logic for some types (archetypes and protocol compositions). Also add a
test that lookup finds members of archetype's superclass, which the original
(duplicated) code did not handle.
Swift SVN r6363
At some point this will change because of re-exported modules, but for now
just don't crash when performing unqualified lookup on a loaded module.
Also, auto-load our adapter libraries for loaded modules, not just TUs.
Include "POSIX" in this list. (We really need autolinking.)
Swift SVN r6303