summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Krahn <dkrahn@google.com>2016-01-22 14:06:40 -0800
committerDarren Krahn <dkrahn@google.com>2016-01-22 14:06:40 -0800
commitdf1a065bda6422a3f2c013c3a63bb0e0f39150a8 (patch)
tree4bd08bad8a81d92f98709f649fa7fd990dd76d8e
parent7e763a9434e12c7980529980de5f8eced22b310a (diff)
downloadtpm-df1a065bda6422a3f2c013c3a63bb0e0f39150a8.tar.gz
trunks: Fix generator to match manual changes.
The generated code has had a few changes that were not direct generator output. This fixes the generator so it now outputs the existing code exactly. Change-Id: I72f591d6d591dc704d96df2ff2a1d55c04b2b0d9
-rwxr-xr-xtrunks/generator/generator.py33
1 files changed, 17 insertions, 16 deletions
diff --git a/trunks/generator/generator.py b/trunks/generator/generator.py
index 09b6cd2..1aa4a4f 100755
--- a/trunks/generator/generator.py
+++ b/trunks/generator/generator.py
@@ -81,21 +81,22 @@ _BASIC_TYPES = ['uint8_t', 'int8_t', 'int', 'uint16_t', 'int16_t',
_OUTPUT_FILE_H = 'tpm_generated.h'
_OUTPUT_FILE_CC = 'tpm_generated.cc'
_COPYRIGHT_HEADER = (
- '// \n'
- '// Copyright (C) 2015 The Android Open Source Project \n'
- '// \n'
- '// Licensed under the Apache License, Version 2.0 (the "License"); \n'
- '// you may not use this file except in compliance with the License. \n'
- '// \n'
- '// http://www.apache.org/licenses/LICENSE-2.0 \n'
- '// \n'
- '// Unless required by applicable law or agreed to in writing, software \n'
- '// distributed under the License is distributed on an "AS IS" BASIS, \n'
+ '//\n'
+ '// Copyright (C) 2015 The Android Open Source Project\n'
+ '//\n'
+ '// Licensed under the Apache License, Version 2.0 (the "License");\n'
+ '// you may not use this file except in compliance with the License.\n'
+ '// You may obtain a copy of the License at\n'
+ '//\n'
+ '// http://www.apache.org/licenses/LICENSE-2.0\n'
+ '//\n'
+ '// Unless required by applicable law or agreed to in writing, software\n'
+ '// distributed under the License is distributed on an "AS IS" BASIS,\n'
'// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or '
- 'implied. \n'
- '// See the License for the specific language governing permissions and \n'
- '// limitations under the License. \n'
- '// \n'
+ 'implied.\n'
+ '// See the License for the specific language governing permissions and\n'
+ '// limitations under the License.\n'
+ '//\n\n'
'// THIS CODE IS GENERATED - DO NOT MODIFY!\n')
_HEADER_FILE_GUARD_HEADER = """
#ifndef %(name)s
@@ -107,18 +108,18 @@ _HEADER_FILE_GUARD_FOOTER = """
_HEADER_FILE_INCLUDES = """
#include <string>
-#include <base/basictypes.h>
#include <base/callback_forward.h>
+#include <base/macros.h>
#include "trunks/trunks_export.h"
"""
_IMPLEMENTATION_FILE_INCLUDES = """
#include <string>
-#include <base/basictypes.h>
#include <base/bind.h>
#include <base/callback.h>
#include <base/logging.h>
+#include <base/macros.h>
#include <base/stl_util.h>
#include <base/strings/string_number_conversions.h>
#include <base/sys_byteorder.h>