diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-13 17:42:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-13 17:42:34 +0000 |
commit | b903a072b138e87b8abde4a133098e13b2891615 (patch) | |
tree | d4cd5003e3d3c1f465f5e4c69127f49941a9eaf7 /clang | |
parent | a2730abaaacb1dbe88403bef7e914a459a29a78f (diff) | |
download | bcm5719-llvm-b903a072b138e87b8abde4a133098e13b2891615.tar.gz bcm5719-llvm-b903a072b138e87b8abde4a133098e13b2891615.zip |
ccc: Suffix for PCH files is appended, not replaced.
llvm-svn: 64466
Diffstat (limited to 'clang')
-rw-r--r-- | clang/tools/ccc/ccclib/Driver.py | 9 | ||||
-rw-r--r-- | clang/tools/ccc/ccclib/Types.py | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/clang/tools/ccc/ccclib/Driver.py b/clang/tools/ccc/ccclib/Driver.py index cda016153e8..43e145b9dbe 100644 --- a/clang/tools/ccc/ccclib/Driver.py +++ b/clang/tools/ccc/ccclib/Driver.py @@ -802,10 +802,13 @@ class Driver(object): if phase.type is Types.ImageType: namedOutput = "a.out" else: - inputName = args.getValue(baseInput) - base,_ = os.path.splitext(inputName) assert phase.type.tempSuffix is not None - namedOutput = base + '.' + phase.type.tempSuffix + inputName = args.getValue(baseInput) + if phase.type.appendSuffix: + namedOutput = inputName + '.' + phase.type.tempSuffix + else: + base,_ = os.path.splitext(inputName) + namedOutput = base + '.' + phase.type.tempSuffix # Output to user requested destination? if atTopLevel and finalOutput: diff --git a/clang/tools/ccc/ccclib/Types.py b/clang/tools/ccc/ccclib/Types.py index 1dd3ed90118..94c00410da6 100644 --- a/clang/tools/ccc/ccclib/Types.py +++ b/clang/tools/ccc/ccclib/Types.py @@ -4,7 +4,7 @@ class InputType(object): def __init__(self, name, preprocess=None, onlyAssemble=False, onlyPrecompile=False, tempSuffix=None, - canBeUserSpecified=False): + canBeUserSpecified=False, appendSuffix=False): assert preprocess is None or isinstance(preprocess, InputType) self.name = name self.preprocess = preprocess @@ -12,6 +12,7 @@ class InputType(object): self.onlyPrecompile = onlyPrecompile self.tempSuffix = tempSuffix self.canBeUserSpecified = canBeUserSpecified + self.appendSuffix = appendSuffix def __repr__(self): return '%s(%r, %r, %r, %r, %r, %r)' % (self.__class__.__name__, @@ -72,7 +73,7 @@ JavaType = InputType('java', canBeUserSpecified=True) LLVMAsmType = InputType('llvm-asm', tempSuffix='ll') LLVMBCType = InputType('llvm-bc', tempSuffix='bc') PlistType = InputType('plist', tempSuffix='plist') -PCHType = InputType('precompiled-header', tempSuffix='gch') +PCHType = InputType('precompiled-header', tempSuffix='gch', appendSuffix=True) ObjectType = InputType('object', tempSuffix='o') TreelangType = InputType('treelang', canBeUserSpecified=True) ImageType = InputType('image', tempSuffix='out') |