diff options
| author | Diego Astiazaran <diegoaat97@gmail.com> | 2019-08-15 23:20:42 +0000 |
|---|---|---|
| committer | Diego Astiazaran <diegoaat97@gmail.com> | 2019-08-15 23:20:42 +0000 |
| commit | 77dc05b945ade395baebcc04dd58792fcfc229fb (patch) | |
| tree | 1c5ff293131fd8b46e5947a099fbfe3dbcd5f18d /clang-tools-extra/clang-doc/tool | |
| parent | 6d6babf7457c8128072cb23f079123fa76cafc5b (diff) | |
| download | bcm5719-llvm-77dc05b945ade395baebcc04dd58792fcfc229fb.tar.gz bcm5719-llvm-77dc05b945ade395baebcc04dd58792fcfc229fb.zip | |
[clang-doc] Fix use of source-root flag
The value, if any, of --source-root flag was not being used.
This has been fixed and the logic was moved to the ClangDocContext
contructor.
Differential revision: https://reviews.llvm.org/D66268
llvm-svn: 369065
Diffstat (limited to 'clang-tools-extra/clang-doc/tool')
| -rw-r--r-- | clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp index e569d89ed8f..5cb6e9e672d 100644 --- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp +++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp @@ -203,17 +203,11 @@ int main(int argc, const char **argv) { tooling::ArgumentInsertPosition::END), ArgAdjuster); - llvm::SmallString<128> SourceRootDir; - // Check if the --source-root flag has a value - if (SourceRoot.empty()) - // If it's empty the current path is used as the default - llvm::sys::fs::current_path(SourceRootDir); - clang::doc::ClangDocContext CDCtx = { Exec->get()->getExecutionContext(), PublicOnly, OutDirectory, - SourceRootDir.str(), + SourceRoot, RepositoryUrl, {UserStylesheets.begin(), UserStylesheets.end()}, {"index.js", "index_json.js"}}; |

