forked from OSchip/llvm-project
Minor improvement to format...no functionality change.
llvm-svn: 84203
This commit is contained in:
parent
2f9be50774
commit
1cfb96cd14
|
@ -292,16 +292,15 @@ CXTranslationUnit clang_createTranslationUnitFromSourceFile(
|
|||
const char *source_filename,
|
||||
int num_command_line_args, const char **command_line_args)
|
||||
{
|
||||
// Generate a temporary name for the AST file.
|
||||
char astTmpFile[L_tmpnam];
|
||||
|
||||
// Build up the arguments for involking clang.
|
||||
const char * argv[ARG_MAX];
|
||||
int argc = 0;
|
||||
const char * argv[ARG_MAX];
|
||||
argv[argc++] = clangPath;
|
||||
argv[argc++] = "-emit-ast";
|
||||
argv[argc++] = source_filename;
|
||||
argv[argc++] = "-o";
|
||||
// Generate a temporary name for the AST file.
|
||||
char astTmpFile[L_tmpnam];
|
||||
argv[argc++] = tmpnam(astTmpFile);
|
||||
for (int i = num_command_line_args; i < num_command_line_args; i++)
|
||||
argv[argc++] = command_line_args[i];
|
||||
|
@ -316,7 +315,8 @@ CXTranslationUnit clang_createTranslationUnitFromSourceFile(
|
|||
|
||||
// If execv returns, it failed.
|
||||
assert(0 && "execv() failed");
|
||||
} else { // This is run by the parent.
|
||||
}
|
||||
// This is run by the parent.
|
||||
int child_status;
|
||||
pid_t tpid;
|
||||
do { // Wait for the child to terminate.
|
||||
|
@ -326,7 +326,6 @@ CXTranslationUnit clang_createTranslationUnitFromSourceFile(
|
|||
// Finally, we create the translation unit from the ast file.
|
||||
return clang_createTranslationUnit(CIdx, astTmpFile);
|
||||
}
|
||||
}
|
||||
|
||||
void clang_disposeTranslationUnit(
|
||||
CXTranslationUnit CTUnit)
|
||||
|
|
Loading…
Reference in New Issue